]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
sessionMode: Add extraStylesheet property
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 17 May 2012 13:52:02 +0000 (15:52 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Tue, 22 May 2012 17:42:28 +0000 (19:42 +0200)
Add a sessionMode.extraStylesheet property, which may be used for
mode-specific style information.

https://bugzilla.gnome.org/show_bug.cgi?id=676156

js/ui/main.js
js/ui/sessionMode.js

index 47fd8333c8e156646a3b671cb9905c3dd03c789f..6adcd03f4729492ca0c835631f6434827270d4da 100644 (file)
@@ -71,7 +71,6 @@ let networkAgent = null;
 let _startDate;
 let _defaultCssStylesheet = null;
 let _cssStylesheet = null;
-let _gdmCssStylesheet = null;
 let _overridesSettings = null;
 
 let background = null;
@@ -166,7 +165,6 @@ function start() {
     global.stage.no_clear_hint = true;
 
     _defaultCssStylesheet = global.datadir + '/theme/gnome-shell.css';
-    _gdmCssStylesheet = global.datadir + '/theme/gdm.css';
     loadTheme();
 
     // Set up stage hierarchy to group all UI actors under one container.
@@ -494,8 +492,8 @@ function loadTheme() {
 
     let theme = new St.Theme ({ application_stylesheet: cssStylesheet });
 
-    if (sessionMode.sessionType == Shell.SessionType.GDM)
-        theme.load_stylesheet(_gdmCssStylesheet);
+    if (sessionMode.extraStylesheet)
+        theme.load_stylesheet(sessionMode.extraStylesheet);
 
     if (previousTheme) {
         let customStylesheets = previousTheme.get_custom_stylesheets();
index ebc7ab9c1126ddcccab1b608802dd0ec8a0e3d3d..3814d825c8508aab4d35bbdf92ce2dd04fcf252e 100644 (file)
@@ -18,6 +18,7 @@ const _modes = {
              hasRunDialog: false,
              hasWorkspaces: false,
              createSession: Main.createGDMSession,
+             extraStylesheet: global.datadir + '/theme/gdm.css',
              sessionType: Shell.SessionType.GDM },
 
     'user': { hasOverview: true,
@@ -29,6 +30,7 @@ const _modes = {
               hasRunDialog: true,
               hasWorkspaces: true,
               createSession: Main.createUserSession,
+              extraStylesheet: null,
               sessionType: Shell.SessionType.USER }
 };